package com.kou.backend.service;

import com.github.pagehelper.PageInfo;
import com.kou.backend.dto.user.SaveLoginLogDTO;
import com.kou.backend.entity.UserLoginLogDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kou.backend.request.log.ExportLogReqDTO;
import com.kou.backend.request.log.LogLoginQueryListReqDTO;
import com.kou.backend.resposne.log.LogLoginListResponseDTO;

import jakarta.servlet.http.HttpServletResponse;

/**
 * @author Kou
 * @description 针对表【op_user_login_log(用户登录日志表)】的数据库操作Service
 * @createDate 2023-09-02 12:02:17
 */
public interface UserLoginLogService extends IService<UserLoginLogDO> {
    /**
     * 保存登录日志
     *
     * @param loginLogDTO 登录日志dto
     */
    void saveLog(SaveLoginLogDTO loginLogDTO);

    /**
     * 查询登录日志列表
     *
     * @param logLoginQueryListReqDTO 查询log请求体
     * @return 分页查询结果
     */
    PageInfo<LogLoginListResponseDTO> queryList(LogLoginQueryListReqDTO logLoginQueryListReqDTO);

    /**
     * 批量导出登录日志
     *
     * @param exportLogReqDTO     导出日志请求体
     * @param httpServletResponse response
     */
    void export(ExportLogReqDTO exportLogReqDTO, HttpServletResponse httpServletResponse);
}
